package com.hone.honewed.service.QianMenu.impl;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.eig.common.entity.course.EduCourse;
import com.eig.common.entity.course.Video;
import com.eig.common.entity.homepageentity.banner.CrmBanner;
import com.eig.common.vo.Result;
import com.hone.honewed.dao.QianMenu.QianMenuDao;
import com.hone.honewed.dao.QianMenu.VideoDao;
import com.hone.honewed.fegin.CourseInterface;
import com.hone.honewed.service.QianMenu.QianMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ：YQ袁（2446806940@qq.com）
 * @date ：Created in 2022/12/29 15:47
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class QianMenuServiceImpl implements QianMenuService {

    @Autowired
    private QianMenuDao qianMenuDao;

    @Resource
    private CourseInterface courseInterface;
    @Autowired
    private VideoDao video;
    @Override
    public Result getAllQianMenu() {
        QueryWrapper<CrmBanner> wrapper = new QueryWrapper<>();
        wrapper.eq("is_deleted",0);
        wrapper.eq("is_disable",0);
        List<CrmBanner> crmBanners = qianMenuDao.selectList(wrapper);

        Result pidByid = courseInterface.findsubject();
        Map<String, Object> map=new HashMap<>();
        map.put("classList",crmBanners);
        return new Result(2000,"查询成功",pidByid.getData());
    }
}
